<!--#include virtual="/Common/Config.asp" -->
<!--#include virtual="/Common/conn.asp" -->
<!--#include virtual="/2010admin/Check_IsLogin.asp" -->
<!--#include virtual="/Common/Function.asp" -->
<!--#include virtual="/2010admin/Check_Priv.asp"-->
<!--#include virtual="/2010admin/Common/Query_List_GetSQL.asp"-->
<%
'==========================================
'**********	Modify  Start  ****************
dim TITLE,DISPFILD,PAGESIZE,SQL,HV
dim AddLabel,addURL,delURL,editURL,detailURL,detailURLsn
TITLE="酒店查询"
DISPFILD="Hotel_Name<酒店名称,Hotel_City<酒店城市"
PAGESIZE="20"
HV="H"

AddLabel="增加"
addURL="Hotel_Add.asp"
delURL="Hotel_Del.asp"
editURL="Hotel_Edit.asp"
detailURL="Hel_Detail.asp"
detailURLsn=1

'置顶排序分类
Sort_Name="酒店"

'设置置顶文件
Set_Top_URL = "Hotel_Set_Top.asp"

'排序操作文件
Sort_Url 	= "Hotel_Sort.asp"

Sort_Title  = "酒店排序"


'其他子操作列表 以#分隔
Other_Title = "子菜单编辑"
Other_Url   = "admin_sub_menu_Query.asp"




'********** 生成SQL ***********************
sql = "SELECT Hotel_Id,Hotel_Name,Hotel_City,Hotel_Area,CASE Hotel_Star "&_
	  " WHEN 1 THEN '三星' " &_
	  " WHEN 2 THEN '四星' " &_
	  " WHEN 3 THEN '准五' " &_
	  " WHEN 4 THEN '五星' " &_
	  " WHEN 5 THEN '3A家庭旅馆' " &_
	  " WHEN 6 THEN '4A家庭旅馆' " &_
	  " WHEN 7 THEN '5A家庭旅馆' " &_
	  " WHEN 0 THEN '未评级' " &_

      " END AS Hotel_Star_S," &_
	  "	CASE Hotel_Hot "&_
	  " WHEN 1 THEN '是' " &_
	  " WHEN 0 THEN '否' " &_
      " END AS Hotel_Hot_S, " &_
	  "	CASE Hotel_Recommend "&_
	  " WHEN 1 THEN '是' " &_
	  " WHEN 0 THEN '否' " &_
      " END AS Hotel_Recommend_S, " &_

	  "	CASE Hotel_IsHide "&_
	  " WHEN 1 THEN '是' " &_
	  " WHEN 0 THEN '否' " &_
      " END AS Hotel_IsHide_S, " &_
	  "	CASE Hotel_IsMeeting "&_
	  " WHEN 1 THEN '是' " &_
	  " WHEN 0 THEN '否' " &_
      " END AS Hotel_IsMeeting_S " &_

	  " FROM Hotel_Basic_Info WHERE 1=1  "

	If Request.ServerVariables ("Request_Method")="POST" Then

		Hotel_Name	 = reform("Hotel_Name")
		Hotel_City	 = reform("Hotel_City")
		Hotel_Area	 = reform("Hotel_Area")
		Hotel_IsHide = reform("Hotel_IsHide")

		Session("Hotel_Name")  = Hotel_Name
		Session("Hotel_City")  = Hotel_City
		Session("Hotel_Area")  = Hotel_Area
		Session("Hotel_IsHide")= Hotel_IsHide
		Session("PageNo")	   = PageNo
	Else
		Hotel_Name	 = Session("Hotel_Name")
		Hotel_City	 = Session("Hotel_City")
		Hotel_Area	 = Session("Hotel_Area")
		Hotel_IsHide = Session("Hotel_IsHide")
		PageNo		 = Session("PageNo")
	End If

	sql = EqualSql("Hotel_City",Hotel_City,sql)
	sql = EqualSql("Hotel_Area",Hotel_Area,sql)
	sql = LikeSql("Hotel_Name",Hotel_Name,sql)
	sql = EqualSql("Hotel_IsHide",Hotel_IsHide,sql)

	sql = sql & " Order By Hotel_ID DESC "


'**********	Modify  Stop  *****************
'==========================================

If Request.form("previous")="上一页" Then PageNo=request.form("PageNo")-1
If Request.form("next")="下一页" Then PageNo=request.form("PageNo")+1
If Request.form("GotoPageNo")<>"" Then PageNo=request.form("GotoPageNo")
If Request.form("GotoPageNo2")<>"" Then	PageNo=request.form("GotoPageNo2")
%>

<HTML>
<HEAD>
<TITLE><%=Title%></TITLE>
<link rel="stylesheet" href="/css/mycss.css" type="text/css">
<script language="javascript" src="/lib/prototype.js"></script>
<script language="javascript" src="/2010admin/js/function.js"></script>
</HEAD>
<BODY BGCOLOR="#FFFFFF"><br>
<form method="post" name="form">
<TABLE cellSpacing=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD align=left><FONT size=4><B><%=TITLE%></B></FONT>
	<%if addURL<>"" then%>
	<input type='button' class='inputbutton' value='<%=AddLabel%>' name='add' onclick="window.location.href='<%=addURL%>'">
	<%end if%>
	<% If Sort_Url<>"" Then %>
	<input type='button' class='inputbutton' value='<%=Sort_Title%>' name='add' onClick="window.location.href='<%=Sort_Url%>'">
	<% End If %>
	</TD>
	<TD align=left width=20%>
	  <!-- 搜索开始 -->
      <TABLE cellSpacing=0 cellPadding=1 border=0>
        <TR>
		  <TD>酒店名称：</TD>
		  <TD>城市：</TD>  
		  <TD>区域：</TD>
		  <TD>隐藏：</TD>
        </TR>
        <TR>
          <TD><INPUT class=inputtext size=8 name="Hotel_Name" Value="<%=Hotel_Name%>"></TD>
		  <TD><% AjaxSelected_BySql "Hotel_City","SELECT HC_Name,HC_Name FROM Hotel_City ORDER BY HC_Order ASC","全部",Hotel_City,"Hotel_City_Select()" %></TD>
		  <TD>
			<select name="Hotel_Area" id="Hotel_Area" style="width:120">
				<option value="">全部</option>
			 </select>
		  </TD>
			<TD><% MySelected "Hotel_IsHide","1,0","是,否","全部",Hotel_IsHide %></TD>
       </TR>
	   </TABLE>

	</TD>
    <TD vAlign=middle width="20%"> &nbsp;&nbsp;
      <INPUT type="submit" class="button" value="搜索" name="search">&nbsp;
	<br></TD>

   </TR>
  </TBODY>
</TABLE>
<HR SIZE=1>
<br>
<%
IF NOT Query_List_GetSQL(DISPFILD,SQL,PAGESIZE,HV,delURL,editURL,detailURL,detailURLsn) THEN
	Response.Write "<br><BR><center><font size=2><font color=#ff0000>程序执行错误！请与系统管理员联系！"
END IF
'RS.CLOSE
CONN.CLOSE
SET RS=NOTHING
SET CONN=NOTHING
%>
</FORM>
</BODY>
</HTML>
